package com.s69.demo.controller;

import com.s69.demo.dao.AppCategoryDao;
import com.s69.demo.service.AppCategoryService;
import com.s69.demo.vo.CategoryTreeVo;
import com.s69.demo.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/category")
public class CategoryTreeController {

    @Autowired
    AppCategoryService appCategoryService;

    @GetMapping("/tree")
    public ResultVo tree(){
        CategoryTreeVo vo=appCategoryService.tree();
        return ResultVo.success("",vo);
    }

}
